From: Peter Wagner <​tripolar@gmx.at> Date: Mon, 23 Sep 2013 10:11:17 +0000 (+0000) Subject: portmap: switch to new procd init script style and create and use the "rpc" user... X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=b9d3e578f8bdc722bfaccb75ebe58b13d4421b40;p=openwrt%2Fsvn-archive%2Fpackages.git portmap: switch to new procd init script style and create and use the "rpc" user instead of the "nobody" user for the daemon Signed-off-by: Peter Wagner SVN-Revision: 38134 --- diff --git a/net/portmap/Makefile b/net/portmap/Makefile index baae0aa65..c1cf452d3 100644 --- a/net/portmap/Makefile +++ b/net/portmap/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=portmap PKG_VERSION:=6.0 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz PKG_SOURCE_URL:=http://neil.brown.name/portmap/ @@ -37,7 +37,7 @@ endef MAKE_FLAGS += \ CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -DHOSTS_ACCESS -DFACILITY=LOG_DAEMON -DIGNORE_SIGCHLD" \ - RPCUSER="nobody" \ + RPCUSER="rpc" \ LDLIBS="$(TARGET_LDFLAGS) -lwrap $(LIBRPC)" \ all diff --git a/net/portmap/files/portmap.init b/net/portmap/files/portmap.init index e73701c8e..e3e27b7ed 100644 --- a/net/portmap/files/portmap.init +++ b/net/portmap/files/portmap.init @@ -4,10 +4,13 @@ START=19 STOP=19 -start() { - service_start /usr/sbin/portmap -} +USE_PROCD=1 -stop() { - service_stop /usr/sbin/portmap +start_service() { + user_exists rpc 65533 || user_add rpc 65533 65533 rpc /var/empty + group_exists rpc 65533 || group_add rpc 65533 + + procd_open_instance + procd_set_param command /usr/sbin/portmap -f + procd_close_instance }